package action;

import entity.*;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletResponse;

import org.apache.struts2.ServletActionContext;

import service.tHistoryService;

public class SearchtHistoryAction {
	
	private tHistoryService thistoryService;
	
	public String search() throws IOException{
		
		ServletResponse response = ServletActionContext.getResponse();
		response.setCharacterEncoding("utf-8");
		PrintWriter out = response.getWriter();
		
		List<tHistory> lists = new ArrayList<tHistory>();
		
		lists = thistoryService.search();
		
		System.out.println(lists.get(0).getId()+"++++++"+lists.get(0).gethTime());
		
		return null;
	}

	public tHistoryService getThistoryService() {
		return thistoryService;
	}

	public void setThistoryService(tHistoryService thistoryService) {
		this.thistoryService = thistoryService;
	}
	

}
